package com.logtoolkit.entity.docs;

import lombok.Data;
import org.apache.solr.client.solrj.beans.Field;
import org.springframework.data.solr.core.mapping.Dynamic;
import org.springframework.data.solr.core.mapping.SolrDocument;

import java.util.HashMap;
import java.util.Map;

@Data
@SolrDocument(solrCoreName = "accesslog")
public class AccessLogDocs {

    private String id;//uuid
    @Field
    private String h;// ip 211.28.65.253
    @Field
    private String l;// local user --
    @Field
    private String u;// user agent
    @Field
    private String t;// time 18/Jul/2012:17:00:01 +0800
    @Field
    private String r;// request "GET /article-10000.html HTTP/1.1"
    @Field
    private String s;// status 200
    //private String b;// bytes
    @Field
    private String rf;// referer
    @Field
    private String rt;// request time
    @Field
    private String rst;//response time
    @Field
    private long ct;// create time
    @Dynamic
    @Field("ext_*")
    private Map<String, Object> ext = new HashMap<>();
}
